package java8_24.oop.Test_6;

public class Pet {
    private String name;
    private double weight;
    private String varieties;

    public Pet(String name, double weight, String varieties) {
        this.name = name;
        this.weight = weight;
        this.varieties = varieties;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getVarieties() {
        return varieties;
    }

    public void setVarieties(String varieties) {
        this.varieties = varieties;
    }
    public void eat(){
        System.out.println(name+"会吃东西");
    }
    public void sleep(){
        System.out.println(name+"会睡觉");
    }
    public void show(){
        System.out.println(name+"是"+varieties+"品种，体重"+weight+"千克");
    }
}
